<?php

namespace App\Http\Controllers\Index;

use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Auth;
use App;
use DB;
use Exception;
class IndexcationController extends Controller
{
	// public $jsonCode = '{"code":"%d","msg":"%s","data":%s}';    //　返回数据的json体

	/**
	* Create a new authentication controller instance.
	*
	* @return void
	*/
	public function __construct()
	{
		// $this->middleware('auth');
	}

	/**
	* 
	*
	* @return
	*/
	public function index( Request $request )
	{
		try{
			// $user = Auth::user();
			// $nickname = $user->permission->nickname;
			// $tvmid = $user->permission->utitle;
			// $adInfo = App\Administrator::where('tvmid', $tvmid)->first()->toArray();
			// $administrator_id = $adInfo['id'];
			// $csrf_token = $request->session()->token();
			// $dataarr = array('nickname'=>$nickname, 'tvmid'=>$tvmid, 'csrf_token'=>$csrf_token);
			// $dataarr = array( 'nickname'=>$nickname, 'tvmid'=>$tvmid );
			return view( '/index/index' );
		} catch (Exception $ex) {
			return response()->json(array('code'=>'1', "msg"=>$ex->getMessage()))->setCallback();
		}
	}

}
